#pragma once
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define SuperMax 10000

typedef char** HuffmanCode;
typedef struct HuffmanTreeNode
{
	int weight;
	int parent;
	int lchild;
	int rchild;
}HTNode, *HuffmanTree;

int Min(HuffmanTree t, int n);
void Select(HuffmanTree* t, int n, int* s1, int* s2);
void HuffmanCoding(HuffmanTree* HT, HuffmanCode* HC, int* w, int n);


